<template>
  <div
    class="jy-style-height message-box"
    :style="{
      background: ` url(${publicUrls + 'free/style13/publicStyle13Bg2.png' + '?imageView2/3/format/webp'})`,
    }"
  >
    <div class="content-box">
      <div class="message-heard">
        <img class="backHome" @click="blankHome" :src="publicUrls + 'free/style13/backHome.png'" alt="" />
        <div class="heard-title">
          <img :src="publicUrls + 'free/style13/arrow1.png'" alt="" />
          <p>留言板</p>
          <img :src="publicUrls + 'free/style13/arrow1.png'" alt="" />
        </div>
      </div>
      <div class="content-bg">
        <div class="comment-box">
          <comment text="发表" />
        </div>
        <div class="commentList-box">
          <div class="commentNum" v-if="total !== 0">共{{ total }}条留言</div>
          <div class="commentList-box-content">
            <ScrollBox
              color="rgba(50, 43, 37, 1)"
              v-if="scrollheight"
              :byid="4235"
              :width="scrollheight"
              :scroll-src="publicUrls + 'free/style13/scrollBar.png'"
            >
              <template #solidBorderCon>
                <commentList
                  @emitTotal="emitTotal"
                  textColor="rgba(0, 0, 0, 0.80)"
                  bgColor="rgba(196, 196, 196, 0.2)"
                  replyColor="rgba(0, 0, 0, 0.80)"
                />
              </template>
              <template #solidBorderEx>
                <div class="solidBorder-child"></div>
              </template>
            </ScrollBox>
          </div>
        </div>
      </div>
      <div class="content-door">
        <i class="iconfonts">&#xe6dd;</i>
        <span>永不落幕的展览与展示平台</span>
      </div>
    </div>
    <MenuNavigation />
  </div>
</template>

<script lang="ts">
// @ts-nocheck
export default defineComponent({
  name: 'style13',
});
</script>

<script setup lang="ts">
// @ts-nocheck
import { defineComponent, ref } from 'vue';
import comment from '../messageComponent/style13/comment.vue';
import commentList from '../messageComponent/style13/commentList.vue';
import { publicUrls } from '@/utils/minxin';
import { commonDataStore, useProjectStore } from '@/store';
import { useRouter, useRoute } from 'vue-router';
import ScrollBox from '../scrollBox.vue';
import MenuNavigation from '@/freeComponents/menuNavigation/index.vue';

const router = useRouter();
const route = useRoute();
const store = useProjectStore();
const total = ref(0);
const scrollheight = ref();
const commonStore = commonDataStore();
let viewportHeight = window.innerHeight;
scrollheight.value = viewportHeight * 0.4468;
const blankHome = () => {
  store.menuId = null;
  router.push({ name: route.meta.loopType ? 'exhibitionHome' : 'templateedit' });
};
const emitTotal = (num: number) => {
  total.value = num;
};
</script>

<style scoped lang="less">
.message-box {
  width: 100%;
  padding-bottom: 0px;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

// 头部
.content-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 40px 0;
  padding-bottom: 0px;
  z-index: 1;
  position: relative;
  .message-heard {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 76px;
    margin-bottom: 24px;
    .heard-title {
      display: flex;
      align-items: center;
      ::v-deep p {
        font-family: SourceHanSerifCN-Bold;
        font-size: 32px;
        color: #333333;
        line-height: 48px;
        margin: 0 20px;
      }
      img {
        width: 162px;
        height: 12px;
        &:last-child {
          transform: rotate(180deg);
        }
      }
    }
    .backHome {
      cursor: pointer;
      width: 24px;
      height: 22px;
      position: absolute;
      left: 76px;
      top: 50%;
      transform: translateY(-50%);
    }
  }
}

// 内容
.content-bg {
  width: calc(100% - 120px);
  height: 100%;
  background: url(https://static.jiyi.show/free/style13/publicStyle11Bg3.png?imageView2/format/webp) no-repeat
    center/100% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 110px;
  margin: 0 auto;
  overflow: hidden;

  // 输入部分盒子
  .comment-box {
    width: 100%;
    margin-bottom: 40px;
    // 输入框样式
    ::v-deep .t-textarea__inner {
      border-radius: 4px;
      background: #eee;
    }

    // 输入框hover边框样式
    ::v-deep .t-textarea__inner:hover {
      border: 1px solid #676567;
    }
  }

  // 留言部分盒子
  .commentList-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    // 留言数量文本
    .commentNum {
      width: 100%;
      height: 24px;
      font-family: PingFang SC;
      font-size: 16px;
      color: rgba(0, 0, 0, 0.59);
      line-height: 24px;
      text-align: left;
      margin-bottom: 24px;
    }
    // 留言列表
    .commentList-box-content {
      width: 100%;
      height: 100%;
      &::-webkit-scrollbar {
        display: none;
      }

      // 头像
      :deep(.t-avatar) {
        width: 48px !important;
        height: 48px !important;
      }
      // 单个留言内容样式
      ::v-deep .commentItem {
        margin-bottom: 50px;
      }
      // 留言人名称
      ::v-deep .name {
        color: rgba(0, 0, 0, 0.59);
      }
      // 留言时间
      ::v-deep .data {
        color: rgba(0, 0, 0, 0.38);
      }

      // 滚动条轨道
      .solidBorder-child {
        width: 2px;
        height: 100%;
        background: rgba(51, 51, 51, 0.2);
        border-radius: 2px;
      }
      // 滚动内容宽度
      ::v-deep .unit-exbi-remarks-info-remarks {
        width: 100% !important;
      }
      // 滚动条位置
      ::v-deep .solid-box-parent-p {
        right: -50px;
      }
      // 滚动条按钮
      ::v-deep .templatestyle1-scroll-box-tumb {
        display: flex;
        justify-content: center;
        align-items: center;
        img {
          width: 32px !important;
          height: 32px !important;
          margin-top: -10px;
        }
      }
    }
  }
}

// 底部logo
.content-door {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  .iconfonts {
    font-size: 26px;
    color: rgba(94, 94, 94, 1);
    margin-bottom: 4px;
    line-height: 32px;
  }
  span {
    font-family: PingFang SC;
    font-size: 16px;
    line-height: 32px;
    color: rgb(114, 114, 114);
    margin-left: 20px;
    padding-bottom: 7px;
  }
}
</style>